home *** CD-ROM | disk | FTP | other *** search
-
- SEED equ $43f7 ;any old numbers!
- CONSTANT1 equ $0001
- CONSTANT2 equ $0002
- CONSTANT3 equ $0003
-
-
- section maincode,code
-
- start movem.l a0-a6/d1-d7,-(a7)
- move.l #$dff000,a0
- move.l #vars,a1
- move.w $1c(a0),orig_inten(a1)
- move.w $02(a0),orig_dmacon(a1)
-
- move.l #screen,d0 ;top quarter
- move.l #bitplane1,a2
- move.w d0,$6(a2)
- swap d0
- move.w d0,$2(a2)
- swap d0
- addq.l #2,d0
- move.w d0,$e(a2)
- swap d0
- move.w d0,$a(a2)
-
- move.l #screen,d0 ;2nd quarter
- move.l #bitplane2,a2
- move.w d0,$6(a2)
- swap d0
- move.w d0,$2(a2)
- swap d0
- addq.l #2,d0
- move.w d0,$e(a2)
- swap d0
- move.w d0,$a(a2)
-
- move.l #screen,d0 ;3rd quarter
- move.l #bitplane3,a2
- move.w d0,$6(a2)
- swap d0
- move.w d0,$2(a2)
- swap d0
- addq.l #2,d0
- move.w d0,$e(a2)
- swap d0
- move.w d0,$a(a2)
-
- move.l #screen,d0 ;4th quarter
- move.l #bitplane4,a2
- move.w d0,$6(a2)
- swap d0
- move.w d0,$2(a2)
- swap d0
- addq.l #2,d0
- move.w d0,$e(a2)
- swap d0
- move.w d0,$a(a2)
-
- move.w #seed,rand(a1)
- move.w #$7fff,$9a(a0)
- move.w #$8730,$96(a0)
- move.l #copper,$80(a0)
-
- *-----------------------------------------------------------------------------
-
- wloop andi.w #$10,$dff01e ;wait for a copper irq
- beq.s wloop
- move.w #$10,$dff09c
-
- bsr routine
-
- btst #6,$bfe001
- bne wloop
-
- End Move.l $4,a6 ;restor system
- move.l #gfxtext,a1
- moveq #0,d0
- jsr -$228(a6)
- addi.l #$26,d0
- move.l d0,a0
- move.l (a0),$dff080
- clr.w $dff088
-
- move.l #vars,a1
- move.w orig_inten(a1),d0
- move.w orig_dmacon(a1),d1
- ori.w #$c000,d0
- move.w #$7fff,$dff09a
- move.w d0,$dff09a
- ori.w #$8000,d1
- move.w #$7fff,$dff096
- move.w d1,$dff096
-
- movem.l (a7)+,a0-a6/d1-d7
- moveq #0,d0
- rts
-
- *----------------------------------------------------------------------------
- **** ROUTINES ****
- *----------------------------------------------------------------------------
-
- routine move.w rand(a1),d0
- move.w #constant1,d1 ;any old number
- move.w #constant2,d2 ;any old number
- move.l #screen,a0
- move #($44*23)-1,d7
- loop add.w d1,d0 ;bit of maths to produce
- ror.w #1,d0 ;some 'random' numbers
- neg.w d0
- add.w d2,d0
- add.w #constant3,d2 ;any old number
- move.w d0,(a0)+
- dbf d7,loop
- add.w d0,rand(a1) ;start at number last created
- rts
-
- *----------------------------------------------------------------------------
-
- vars dcb.w $10,0
-
- orig_inten equ $0
- orig_dmacon equ $2
- rand equ $4
-
- gfxtext dc.b "graphics.library",$0
-
- even
-
- section chipstuff,data_c
-
- copper dc.l $0101ff00,$01002200,$01020007,$01040000
- dc.l $008e2461,$009034d1,$00920028,$009400d8
- dc.l $01080000,$010a0000,$01fc0000
-
- bitplane1 dc.l $00e00000,$00e20000,$00e40000,$00e60000
- dc.l $00e80000,$00ea0000,$00ec0000,$00ee0000
- copcol dc.l $01800000,$01820fff,$01840ccc,$01860000
- dc.l $01880fff,$018a0fff,$018c0fff,$018e0fff
- dc.l $01900fff,$01920fff,$01940fff,$01960fff
- dc.l $01980fff,$019a0fff,$019c0fff,$019e0fff
- dc.l $01a00000,$01a20FFF,$01a40EEF,$01a60DDF
- dc.l $01a80CCF,$01aA0BBF,$01aC0AAF,$01aE099F
- dc.l $01b0088F,$01b2066E,$01b4055C,$01b6033B
- dc.l $01b8022A,$01bA0119,$01bC0117,$01bE0006
-
- copspr dc.l $01200000,$01220000,$01240000,$01260000
- dc.l $01280000,$012a0000,$012c0000,$012e0000
- dc.l $01300000,$01320000,$01340000,$01360000
- dc.l $01380000,$013a0000,$013c0000,$013e0000
- dc.l $009c8010
-
- dc.l $6801ff00
-
- bitplane2 dc.l $00e00000,$00e20000,$00e40000,$00e60000
- dc.l $ac01ff00
-
- bitplane3 dc.l $00e00000,$00e20000,$00e40000,$00e60000
- dc.l $f001ff00
-
- bitplane4 dc.l $00e00000,$00e20000,$00e40000,$00e60000
- dc.l $fffffffe
-
- screen ds.w 20*256
-
-